package vip.liux.contracts.repositories.pay;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.ListCrudRepository;
import org.springframework.data.repository.ListPagingAndSortingRepository;
import org.springframework.data.repository.NoRepositoryBean;
import vip.liux.contracts.models.pay.PayWalletTransaction;
import vip.liux.contracts.shared.enums.pay.PayWalletBizType;

import java.util.Optional;

@NoRepositoryBean
public interface PayWalletTransactionRepository extends ListPagingAndSortingRepository<PayWalletTransaction, Long>, ListCrudRepository<PayWalletTransaction, Long> {

    Page<PayWalletTransaction> findPage(Long walletId, String uid, Pageable page);

    Optional<PayWalletTransaction> findBySeqNo(String seqNo);

    Optional<PayWalletTransaction> findByBizIdAndBizType(String bizId, PayWalletBizType bizType);
}